// 导入request.js请求工具
import request from '@/utils/request.js'
// 餐位管理相关接口

// 获取餐位page的接口
export const getSeatsPageApi = (params) => {
    return request.get('/seats/page', {
        params
    })
}

// 添加餐位的接口
export const addSeatsApi = (params) => {
    return request.post('/seats', params);
}

// 查询详情
export const querySeatsByIdApi = (id) => {
    return request.get(`/seats/${id}`)
}

// 修改餐位的接口
export const editSeatsApi = (params) => {
    return request.put('/seats', params);
}

// 删除餐位的接口
export const deleteSeatsApi = (i) => {
    return request.delete('/seats', {
        params: {
            ids: i
        }
    });
}

// 起用停用---批量起用停用接口
export const seatsStatusByStatusApi = (params) => {
    return request.post(`/seats/status/${params.status}`,null,{
        params: { ids: params.id }
    })
}